#ifndef VIDEOTHREAD_H
#define VIDEOTHREAD_H

#include <QThread>
#include <QWidget>
#include <QDebug>
#include <QTcpSocket>
#include <QTimer>
#include <QPixmap>

//文件io的操作
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#define IP_VIDEO "192.168.0.162"
#define PORT_VIDEO 8888
class videothread : public QWidget
{
    Q_OBJECT
public:
    QPixmap *pixmap; //显示图片
    explicit videothread(QWidget *parent = 0);
     ~videothread();
    void run();
    void close();


protected:
signals:
    void display_movie_signals();
public slots:
    void msconnected();
    void msdisconnected();
    void updatepic();
private:
//    QString Msg;

    QTimer  *timer_movie;
    QTcpSocket  *socket;
    char * picbuf;
};

#endif // VIDEOTHREAD_H
